package com.jsu.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.example.model.user.pojo.Prize;
import org.example.model.user.pojo.User;

import java.util.List;

@Mapper
public interface PrizeMapper extends BaseMapper<Prize> {
    @Select("SELECT * FROM point_prize WHERE prize_name LIKE CONCAT('%', #{keyword}, '%') " +
            "OR prize_detail LIKE CONCAT('%', #{keyword}, '%')")
    List<Prize> searchPrizesByKeyword(@Param("keyword") String keyword);

}
